﻿using System;
using System.Collections.Generic;
using System.Text;
using CSA.Infrastructure.DTO;
using CSA.Infrastructure.Models;
using System.Linq;

namespace CSA.Domain.Services
{
    public class UserService : IUserService
    {
        private OpenAuthDBContext _db;
        public UserService(OpenAuthDBContext db)
        {
            _db = db;
        }
        public List<UserDTO> GetAllUsers()
        {
            return _db.User.Select(w => new UserDTO { Name = w.Name }).ToList();

        }
    }
}
